<template>
  <div style="display: inline-block;">
    <el-button style="margin-bottom:10px" type="info" class="buttoncss" icon="el-icon-circle-close" circle title="审核失败原因" @click="dialogTableVisible = true"/>
    <el-dialog v-el-drag-dialog :visible.sync="dialogTableVisible" title="审核失败原因">
      <el-form ref="row_data" label-position="left" label-width="120px" style="width: 400px; margin-left:50px;">
        <el-form-item label="审核失败原因" prop="审核失败原因">
          <el-input v-model="row_data.id" placeholder="审核失败原因" type="textarea"/>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="submitForm()">发送</el-button>
          <el-button @click="close()">取消</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
import elDragDialog from '@/directive/el-dragDialog' // base on element-ui
import { add } from '@/api/merchant/merchant'
import store from '@/store'
export default {
  name: 'DragDialogDemo',
  directives: { elDragDialog },
  data() {
    return {
      dialogTableVisible: false,
      row_data: {
      }
    }
  },
  methods: {
    submitForm() {
      add(store.getters.token, this.row_data).then(res => {
        this.$emit('getLists')
        this.close()
      })
    },
    close() {
      this.dialogTableVisible = false
    }
  }
}
</script>
